/*
 * MyPictureChooser.java
 *
 * Created on May 30, 2006, 7:24 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

/**
 *
 * @author Timoz
 */
import javax.swing.*;

public class MyPictureChooser extends JFileChooser {
    
    /** Creates a new instance of MyPictureChooser */
    public MyPictureChooser(JFrame frame) {
        String extensions [] = {"jpg","jpeg","png","gif"};
        PictureChooserFilter filter= new PictureChooserFilter(extensions,"Image Files");
        setMultiSelectionEnabled(false);
        setAcceptAllFileFilterUsed(false);
        setFileSelectionMode(JFileChooser.FILES_ONLY);
        setFileFilter(filter);
        showOpenDialog(frame);
    }
    
}
